<template>
  <div>
        <ul>
            <li v-for="item in schoollist" :key="item.id">{{ item.school_name }}</li>
        </ul>
  </div>
</template>

<script setup>
import { onMounted } from 'vue';
import {storeToRefs} from 'pinia'
// 引入store
import {useShopStore} from '@/store/moudules/shopStore'
const store = useShopStore()
// console.log(store);
const {
    schoollist
} = storeToRefs(store)
const {
    initschoollist
} = store
console.log('schoollist',schoollist);
onMounted(() => {
    initschoollist()
})



</script>
<style scoped>

</style>